home *** CD-ROM | disk | FTP | other *** search
- Path: locutus.rchland.ibm.com!usenet
- From: pstaite@vnet.ibm.com
- Newsgroups: comp.lang.c++
- Subject: Re: Inline function problem
- Date: 10 Jan 1996 21:55:52 GMT
- Organization: IBM OS/2 Device Driver Development Rochester, MN
- Message-ID: <4d1cl8$qg5@locutus.rchland.ibm.com>
- References: <4d10i5$bc3@newsroom.hitc.com>
- Reply-To: pstaite@vnet.ibm.com
- NNTP-Posting-Host: warpone.rchland.ibm.com
- X-Newsreader: IBM NewsReader/2 v1.2
-
- Try including foo.C in main.C instead of foo.H. This way main.C "sees"
- the definition (body) of the inline function.
-
- A slightly less ugly approach is to put the inline functions in the .H
- file at the end of the declarations. Another idea is to put the inlines
- in a .inl file and include that at the end of the .H file. That way,
- any file that "sees" the declaration of the class can also "see" the
- code for the inlines. Otherwise, the compiler would have to be a mind
- reader to know what to put in main.C. :-))
-
- Phil Staite, team OS/2
- internet: pstaite@vnet.ibm.com internal: pstaite@rchland
-
-